

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'
// 引入初始化样式文件
import '@/styles/common.scss'
// 引入全局指令插件
import { lazyPlugin } from './directives'
// 引入全局组件
import {componentPlugin} from './components/index'

const pinia = createPinia()
// 注册持久化插件，防止刷新token丢失
pinia.use(piniaPluginPersistedstate)

const app = createApp(App)
app.use(lazyPlugin)
app.use(componentPlugin)
app.use(pinia)
app.use(router)

app.mount('#app')





